package com.example.yjhmatch.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yc.yjh.entity.BestPlayer;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author 廖老师
 * @since 2023-07-24
 */
public interface BestPlayerMapper extends BaseMapper<BestPlayer> {
    @Select("select b.*,t.name as \"teams.name\",t.icon as \"teams.icon\"," +
            "p.photo_url as \"players.photo_url\" "+
            "from best_player b " +
            "INNER JOIN teams t on b.team_id=t.team_id " +
            "INNER JOIN players p on b.name=p.name ")
    List<BestPlayer> selectBestPlayer();
}
